package com.ruoyi.common.utils;

import java.math.BigDecimal;

public class MoneyUtil {

    /**
     * @param fee
     * @return
     */
    public static BigDecimal fee2yuan(Long fee) {
        if (fee == null) {
            return new BigDecimal("0.00");
        }
        return BigDecimal.valueOf(fee).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_UP);
    }

    public static BigDecimal fee2yuan(Integer fee) {
        if (fee == null) {
            return new BigDecimal("0.00");
        }
        return BigDecimal.valueOf(fee).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_UP);
    }
}
